{% extends 'base/base.html' %}

{% block css %}
<style>
    .bdsub {
        padding: 1px;
        background: #FFFFFF;
        border: 1px solid #E4E4E4;
    }

    .bdsub #content {
        background: url(/static/img/header_bg.png) no-repeat;
        background-position: 0 -506px;
        background-repeat: repeat-x;
        line-height: 30px;
        position: relative;
        height: auto;
    }

    .grid {
        width: 97%;
        border: 1px solid #E4E4E4;
        margin: 10px;
    }

    .grid caption {
        font-size: 14px;
        font-weight: bold;
        text-align: center;
    }

    .grid .odd {
        text-align: left;
        border-bottom: 1px dotted #E4E4E4;
        padding: 0 3px;
    }
    tbody tr td{
        border-bottom: 1px dotted #E4E4E4;
        padding: 0 3px;
    }
    .grid .odd span {
        float: none;
        color: #FF6600;
    }

    .grid .even {
        height: 31px;
    }

    .grid .even .text {
        height: 19px;
    }
    .grid .even .button{
        height: 21px;
        line-height: 21px;
    }
</style>
{% endblock %}

{% block title %}
<title>注册页面</title>
{% endblock %}


{% block body %}
<div class="bdsub">
    <div class="bdtop"></div>
    <dl id="content">
        <form name="regForm" id="regForm" method="post">
            {% csrf_token %}
            <table class="grid" width="580">
                <caption>新用户注册</caption>
                <tbody>
                <tr>
                    <td class="odd" width="15%">用户名<span class="hottext">(必填)</span></td>
                    <td class="even">
                        <input type="text" class="text" name="username" id="username" size="25"
                                            maxlength="32" style="width:160px" required>
                    </td>
                </tr>
                <tr>
                    <td class="odd" width="15%">密码<span class="hottext">(必填)</span></td>
                    <td class="even"><input type="password" class="text" name="password" id="password" size="25"
                                            maxlength="32" style="width:160px" required>
                    </td>
                </tr>
                <tr>
                    <td class="odd" width="15%">重复密码<span class="hottext">(必填)</span></td>
                    <td class="even"><input type="password" class="text" name="repassword" id="repassword" size="25"
                                            maxlength="32" style="width:160px" required>
                    </td>
                </tr>
                <tr>
                    <td class="odd" width="15%">Email<span class="hottext">(选填)</span></td>
                    <td class="even"><input type="email" class="text" name="email" id="email" size="25"
                                            maxlength="60" style="width:160px">
                    </td>
                </tr>
                <tr>
                    <td class="odd" width="15%">&nbsp;<input type="hidden" name="action" id="action"
                                                             value="newuser">
                    </td>
                    <td class="even">
                        <button type="submit" class="btn btn-default">注册</button>
                        {% if errors %}
                             <span class="text-danger">{{ errors }}</span>
                         {% endif %}
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </dl>
</div>
{% endblock %}